package org.lmind.scale.asyn

class AsynResult[T](r: T) {
  
  private var _fn : (Boolean, T) => Unit = null

  private var _result: T = r;
  
  def result = _result;
  
  def result_=(value: T) = _result = value // writer method

  def success = true
  
  def on(fn : (Boolean, T) => Unit) = _fn = fn
  
}